package com.soen6441.generics;
import java.util.Iterator;

class SpellCheckerExample {
    public static void main(String[] args) {
        SpellChecker spellChecker = new SpellChecker(2);
        spellChecker.addWords("2of12inf.txt");

        Iterable<Correction> corrections =
                spellChecker.corrections("holigens");

        Iterator<Correction> it = corrections.iterator();
        for(int i = 0; i < 5 && it.hasNext(); i++){
            System.out.println(it.next());
        }
    }
}
